package com.changcheng.project.appupgradelog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.changcheng.project.appupgradelog.mapper.AAppUpgradelogsMapper;
import com.changcheng.project.appupgradelog.domain.AAppUpgradelogs;
import com.changcheng.project.appupgradelog.service.IAAppUpgradelogsService;
import com.changcheng.common.utils.text.Convert;

/**
 * OBU升级记录Service业务层处理
 * 
 * @author dazhi
 * @date 2020-10-31
 */
@Service
public class AAppUpgradelogsServiceImpl implements IAAppUpgradelogsService 
{
    @Autowired
    private AAppUpgradelogsMapper aAppUpgradelogsMapper;

    /**
     * 查询OBU升级记录
     * 
     * @param id OBU升级记录ID
     * @return OBU升级记录
     */
    @Override
    public AAppUpgradelogs selectAAppUpgradelogsById(Long id)
    {
        return aAppUpgradelogsMapper.selectAAppUpgradelogsById(id);
    }


    @Override
    public AAppUpgradelogs selectAAppUpgradelogsByDeviceId(String deviceId) {
        return aAppUpgradelogsMapper.selectAAppUpgradelogsByDeviceId(deviceId);
    }

    /**
     * 查询OBU升级记录列表
     * 
     * @param aAppUpgradelogs OBU升级记录
     * @return OBU升级记录
     */
    @Override
    public List<AAppUpgradelogs> selectAAppUpgradelogsList(AAppUpgradelogs aAppUpgradelogs)
    {
        return aAppUpgradelogsMapper.selectAAppUpgradelogsList(aAppUpgradelogs);
    }

    /**
     * 新增OBU升级记录
     * 
     * @param aAppUpgradelogs OBU升级记录
     * @return 结果
     */
    @Override
    public int insertAAppUpgradelogs(AAppUpgradelogs aAppUpgradelogs)
    {
        return aAppUpgradelogsMapper.insertAAppUpgradelogs(aAppUpgradelogs);
    }

    /**
     * 修改OBU升级记录
     * 
     * @param aAppUpgradelogs OBU升级记录
     * @return 结果
     */
    @Override
    public int updateAAppUpgradelogs(AAppUpgradelogs aAppUpgradelogs)
    {
        return aAppUpgradelogsMapper.updateAAppUpgradelogs(aAppUpgradelogs);
    }


    /**
     * 根据deviceId修改App升级记录
     * @param aAppUpgradelogs
     */
    @Override
    public void updateAAppUpgradelogs1(AAppUpgradelogs aAppUpgradelogs) {
        aAppUpgradelogsMapper.updateAAppUpgradelogs1(aAppUpgradelogs);
    }

    /**
     * 删除OBU升级记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAAppUpgradelogsByIds(String ids)
    {
        return aAppUpgradelogsMapper.deleteAAppUpgradelogsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除OBU升级记录信息
     * 
     * @param id OBU升级记录ID
     * @return 结果
     */
    @Override
    public int deleteAAppUpgradelogsById(Long id)
    {
        return aAppUpgradelogsMapper.deleteAAppUpgradelogsById(id);
    }
}
